1. Field of the Invention
The present invention relates to an apparatus for, and a method of, multiplexing video and audio data from a plurality of channels.
This application claims the priority of the Japanese Patent Application Nos. 2002-196276 filed on Jul. 4, 2002 and 2003-137766 filed on May 15, 2003, the entirety of which is incorporated by reference herein.
2. Description of the Related Art
Generally, for distribution of digital contents over a network, a multiplexer is used to multiplex a plurality of elementary streams such as video data, audio data, text data, program data and other system data necessary for data transmission.    Reference cited 1: Japanese Unexamined Application Publication No. 261192 of 1997    Reference cited 2: Japanese Unexamined Application Publication No. 340936 of 1999    Reference cited 3: Japanese Unexamined Application Publication No. 234634 of 1999
Conventionally, the multiplexer used for data distribution over a network includes a random access memory (RAM) which stores elementary streams supplied from a plurality of encoders, a dynamic memory access (DMA) circuit which reads elementary streams stored in RAM and delivers the data at the output terminal thereof, and a central processing unit (CPU) (see the patent documents 1 to 3). In the conventional multiplexer constructed as above, CPU always monitors the elementary streams stored in RAM, and supplies a data transfer command to DMA at a time for the data stored in RAM to be outputted. Upon reception of the transfer command from CPU, DMA will read data from an address designated by CPU and transfer the read data to outside. Thus, in such a conventional multiplexer, CPU manages data in RAM and always controls directly DMA to generate a multiplexed stream.
In the above multiplexer, however, an extremely heavy processing-operation burden is imposed on CPU.
Also, arbitrary operations of data processing are effected synchronously with outputting of a multiplexed stream in some cases. Such arbitrary operations include, for example, various kinds of data processing, such as insertion of dummy data called stuffing data or padding data to a specific position in a multiplexed stream, deletion, immediately before outputting, of data in a specific position in the multiplexed stream, insertion of arbitrary data such as concurrent output time information etc. to a specific position in the multiplexed stream, sending of a timing of supplying data at a specific position in the multiplexed stream to CPU or outside.
On this account, it is a common practice that an identifier, command or the like other than elementary data is pre-inserted in a specific position in a multiplexed stream, such an identifier or the like is detected at the output stage of the multiplexer and the above operations of data processing are started at a position in the multiplexed stream where the identifier is detected.
In case an identifier is inserted in a multiplexed stream, however, there is a possibility that a row of elementary data itself will be wrongly recognized by as an identifier.
To prevent such wrong recognition, it is possible to limit the position where an identifier is inserted, namely, to insert an identifier only at the top of a packet or pack for example. However, this measure will disadvantageously limit the flexibility of a position where data processing is to be started. Alternatively, it is possible to hold an address of a position where an identifier is inserted in a separate register or the like. With this measure, however, the number of registers in the apparatus will disadvantageously limit the number of identifiers that can be inserted for a fixed period.
Also in the multiplexer, CPU always manages directly the data amount in RAM (RAM occupancy) so that elementary streams supplied from each encoder and stored in RAM will not overflow or underflow.
In case CPU makes the direct and continuous management of the RAM occupancy, however, a very heavy processing-operation burden will be imposed on CPU.
Further, simultaneous outputting of a plurality of multiplexed streams needs multiplexers for the output multiplexed streams, respectively. For example, for recording multiplexed a multiplexed stream of a content to a hard disk while distributing another multiplexed stream of the same content over a network, there have to be built two multiplexers, one of which is a multiplexer which generates a multiplexed stream for transfer to the hard disk and the other is a multiplexer which generates a multiplexed stream for distribution over the network.
However, a system using the two multiplexers as above needs as many CPUs, DMAs and others as the multiplexers, which will lead to an increased scale of the hardware.